<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/7/23
  Time: 10:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>入党人员信息查看页面</title>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8 ? MYOA_CHARSET : htmlspecialchars($HTML_PAGE_CHARSET))?>" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="/lib/layui/layui/css/layui.css?20190817.1">
    <link rel="stylesheet" href="/lib/layui/layui/css/common.css">
    <link rel="stylesheet" href="/lib/layui/layui/css/eleTree.css">
    <script type="text/javascript" src="/js/jquery/jquery-1.9.1.js"></script>
    <script src="/lib/layui/layui/layui.js"></script>
    <script src="/lib/jquery.form.min.js"></script>
    <script src="/lib/layui/layui/js/baseCode/base.js?v=2019080918:09" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="/lib/layui/layui/global.js"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <style>
        /*table{*/
        /*    width: 65%;*/
        /*    margin: 0 auto;*/
        /*    margin-bottom: 20px;*/
        /*}*/
        td{
            /*border: 1px solid #999;*/
            padding: 6px 0;
            /*text-align: center;*/
            height: 40px;
        }
        .fromTr>.fromTd1{
            width: 10%;
        }
        .fromTr>.fromTd2{
            width: 20%;
        }
        .fromTd2{
            padding: 0;
        }
        .fromTrinp{
            width: 30%;
            height: 77%;
            border: none;
            padding: 0 10px;
        }
        input,textarea{
            border: none;
            padding-left: 10px;
        }
        input[name="file"]{
            width: 30%;
        }
        .layui-input, .layui-select, .layui-textarea {
            height: 35px;
        }
        .font_style{
            font-family: Microsoft yahei,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;
        }
        table{
            border-collapse:separate!important;
        }
        .layui-form-radio {
            line-height: 20px;
            padding-right: 10px;
            cursor: pointer;
            font-size: 0;
        }
        .layui-btn {
            height: 35px;
            /*background-color: #3691DA;*/
        }
        .layui-disabled, .layui-disabled:hover {
            color: #708090!important;
        }
        .timeMore {
            width: 20%;
        }
        .memRecom{
            /*width: 120px;*/
            border-radius:5px;
            background-color: #dcdcdc;
            height: 30px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            width: 200px;
        }
        .inpSty{
            /*width: 120px;*/
            border-radius:5px;
            background-color: #dcdcdc;
            height: 30px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            width: 200px;
        }
        .developObj{
            /*width: 120px;*/
            border-radius:5px;
            background-color: #dcdcdc;
            height: 30px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            width: 200px;
        }
        /*.apply{*/
        /*    !*width: 120px;*!*/
        /*    border-radius:5px;*/
        /*    background-color: #dcdcdc;*/
        /*    height: 30px;*/
        /*    overflow: hidden;*/
        /*    white-space: nowrap;*/
        /*    text-overflow: ellipsis;*/
        /*    width: 200px;*/
        /*}*/
        .preParty{
            /*width: 120px;*/
            border-radius:5px;
            background-color: #dcdcdc;
            height: 30px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            width: 200px;
        }
        .operation{
            margin-left: 120px;
        }
        .operationTwo{
            margin-left: 120px;
        }
        .operationOne{
            margin-left: 120px;
        }
        .operations{
            margin-left: 220px;
        }
        .tdStyle{
            position: relative;
            padding: 9px 15px;
            min-height: 20px;
            line-height: 20px;
            font-size: 14px;
        }
        .layui-icon {
            font-size: 20px;
        }
        input.fromTrinp{
            width: 200px;
        }
        input{
            color: #666;
        }
        .mindReport{
            /*width: 120px;*/
            display:inline-block;
            border-radius:5px;
            background-color: #dcdcdc;
            /*height: 40px;*/
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            width: 230px;
            line-height: 40px;
        }
        .mindTime{
            /*width: 120px;*/
            margin-left: 5px;
            display:inline-block;
            border-radius:5px;
            background-color: #dcdcdc;
            /*height: 40px;*/
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            width: 200px;
            line-height: 40px;
        }
    </style>
</head>
<body class="bodycolor font_style">
<div border="0" width="90%" cellspacing="0" cellpadding="3" class="small">
    <div class="Big" style="padding: 19px 0;"><img align="absMiddle" src="/img/commonTheme/${sessionScope.InterfaceModel}/infofind11.png" style="margin-left: 35px;margin-bottom: 2px;"><span class="big3" style="font-family: 微软雅黑;font-size: 22px;margin-left: 10px;">入党人员详细信息</span>
        <button class="layui-btn return" style="float: right;margin: 0 10px;">返回</button>
    </div>
</div>
<hr style="background-color:#9E9E9E;height: 1px;width:100%;border: none; margin-top: 0px;"/>
<div class="content">
    <form class="layui-form" action="" lay-filter="example">
        <table class="layui-table"  style="margin: 0 auto;margin-top: 20px;width: 82%;">
            <tbody>
            <tr class="fromTr" style="height: 50px;">
                <td colspan="4" style="font-size: 18px; background-color: #009688; text-align: center; color: white">入党人员详细信息</td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">入党申请人</td>
                <td class="fromTd2"><input class="fromTrinp"  readonly name="username" type="text"></td>
                <td class="fromTd1">发展阶段</td>
                <td class="fromTd2">
                    <select class="fromTrinp" disabled="disabled" name="development"  type="text">
                        <option value="0">申请入党</option>
                        <option value="1">入党审核</option>
                        <option value="2">积极分子</option>
                        <option value="3" >发展对象</option>
                        <option value="4" >发展对象</option>
                        <option value="5">预备党员已接收</option>
                        <option value="6">正式党员</option>
                        <option value="7">入党申请人</option>
                    </select>
                </td>
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">性别</td>
                <td class="fromTd2">
                    <input class="fromTrinp" name="sex" readonly type="text">
                </td>
                <td class="fromTd1">出生日期</td>
                <td class="fromTd2"><input class="fromTrinp"  readonly name="nativity" type="text"></td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">民族</td>
                <td class="fromTd2"><input class="fromTrinp" readonly name="minority" type="text"></td>
                <td class="fromTd1">职务</td>
                <td class="fromTd2"><input class="fromTrinp" readonly name="functionar" type="text"></td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">单位（部门）</td>
                <td class="fromTd2"><input class="fromTrinp" readonly name="unit" type="text"></td>
                <td class="fromTd1">所属党支部</td>
                <td class="fromTd2"><input class="fromTrinp" readonly name="pertain" type="text"></td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">入党介绍人</td>
                <td class="fromTd2"><input style="display: inline-block" readonly class="fromTrinp" name="recommendPerson" type="text"><a class='layui-btn' name="updat1" id="updat1" style='cursor:pointer; display: inline-block;margin-left: 5px;'>变更</a></td>
                <td class="fromTd1">培养联系人</td>
                <td class="fromTd2"><input style="display: inline-block" readonly class="fromTrinp" name="developContacts" type="text"><a class='layui-btn' name="updat2" id="updat2" style='cursor:pointer;display: inline-block;margin-left: 5px;'>变更</a></td>
            </tr>
            <tr>
                <td class="fromTd1">转正时间</td>
                <td class="fromTd2"><input class="fromTrinp layui-disabled"  name="stateTime" type="text"></td>
            </tr>
            <%--            第一阶段开始--%>
            <tr class="fromTr">
                <td colspan="4" style="font-size: 18px; color: #0c8587">入党申请阶段</td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">入党申请时间：</td>
                <td colspan="3"><input class="fromTrinp layui-disabled"  readonly name="applyTime" type="text"></td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">入党申请书</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="apply">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">谈话记录</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="apply" >
                </td>
            </tr>
            <%--            第一阶段结束--%>
            <%--            第二阶段开始--%>
            <tr class="fromTr">
                <td colspan="4" style="font-size: 18px; color: #0c8587">确定入党积极分子阶段</td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">确定积极分子时间：</td>
                <td colspan="3"><input class="fromTrinp layui-disabled"  readonly name="sureTime" type="text"></td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">党员推荐票</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">党员推荐汇总票</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">群团（工会/团支部）推优表</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">支委会会议记录</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">支委会会议决议</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">入党积极分子备案报告</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">入党积极分子备案表</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">培养联系人登记表</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
           <%-- <tr class="fromTr">
                <td class="fromTd1">第一季度思想汇报</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">第二季度思想汇报</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">第三季度思想汇报</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">第四季度思想汇报</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>--%>
            <tr class="fromTr">
                <td class="fromTd1">入党积极分子培养考察表</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="positive">
                </td>
            </tr>
            <%--            第二阶段结束--%>
            <%--            第三阶段开始--%>
            <tr class="fromTr">
                <td colspan="4" style="font-size: 18px; color: #0c8587">确定发展对象阶段</td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">确定发展对象时间：</td>
                <td colspan="3"><input class="fromTrinp layui-disabled"  readonly name="developTime" type="text"></td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">征求党内外群众意见会议记录</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">确定发展对象人选会议记录</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">确定发展对象人选会议决议</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">入党介绍人登记表</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">发展对象人选备案报告</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">上级党委备案批复意见</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">政治审查函调材料</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">确定发展对象公示</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">确定发展对象公示结论</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>

            <tr class="fromTr">
                <td class="fromTd1">政治审查综合报告</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">短期集中培训合格证书</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="develop">
                </td>
            </tr>
            <%--第三节点结束--%>
            <%--            第四阶段开始--%>
            <tr class="fromTr">
                <td colspan="4" style="font-size: 18px;color: #0c8587">预备党员阶段（未接收）</td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">自传</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">确定预备党员候选人会议记录</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">拟接收预备党员公示</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">拟接收预备党员公示结论</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">拟接收预备党员预审请示</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">上级党委预审意见</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">接收预备党员表决票</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr> <tr class="fromTr">
                <td class="fromTd1">接收预备党员汇总票</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">接收预备党员支部大会议记录</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">决接收预备党员支部大会议决议</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">接收预备党员审批请示</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">谈话记录</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">上级党委关于接收预备员的审批意见</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="receive">
                </td>
            </tr>
            <%--            第四阶段结束--%>
            <%--第五阶段开始--%>
            <tr class="fromTr">
                <td colspan="4" style="font-size: 18px;color: #0c8587">预备党员阶段（已接收）</td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">预备党员接受时间：</td>
                <td colspan="3"><input class="fromTrinp layui-disabled"  readonly name="receiveTime" type="text"></td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">入党宣誓纪实表</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <%--<tr class="fromTr">
                <td class="fromTd1">第一季度思想汇报</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">第二季度思想汇报</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">第三季度思想汇报</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr><tr class="fromTr">
                <td class="fromTd1">第四季度思想汇报</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>--%>
            <tr class="fromTr">
                <td class="fromTd1">预备党员考察记录表</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">转正申请书</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">预备党员转正征求内外群众意见</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">拟转为正式党员公示</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">拟转为正式党员公示结论</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">预备党员转正表决票</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">预备党员转正汇总票</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">预备党员转正支部大会议记录</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">决预备党员转正支部大会会议决议</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">预备党员转正审批请示</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <tr class="fromTr">
                <td class="fromTd1">上级党委审批意见</td>
                <td colspan="3" style="text-align: left;  padding-left: 20px;" class="praepare">
                </td>
            </tr>
            <%-- 第五阶段结束--%>
            <tr class="fromTrme" id="tr1">
                <td colspan="4" style="font-size: 18px; color: #0c8587">积极分子阶段思想汇报<a id="add" style="margin-top:0;margin-left:20px;padding: 0 10px;height: 30px;line-height: 30px; display: none" data-type="0" class="layui-btn layui-btn-xs" lay-event="add">添加</a></td>
            </tr>
            <tr class="fromTrme2" id="tr2">
                <td colspan="4" style="font-size: 18px; color: #0c8587">发展对象阶段思想汇报<a id="add1" style="margin-top:0;margin-left:20px;padding: 0 10px;height: 30px;line-height: 30px; display: none" data-type="0" class="layui-btn layui-btn-xs" lay-event="add">添加</a></td>
            </tr>
            <tr class="fromTrme3" id="tr3">
                <td colspan="4" style="font-size: 18px; color: #0c8587">预备党员阶段思想汇报<a id="add2" style="margin-top:0;margin-left:20px;padding: 0 10px;height: 30px;line-height: 30px; display: none" data-type="0" class="layui-btn layui-btn-xs" lay-event="add2">添加</a></td>
            </tr>
            <%--            <tr class="fromTr">--%>
            <%--                <td colspan="4" style="text-align: center">--%>
            <%--                    <button type="button" class="layui-btn return">返回</button>--%>
            <%--                </td>--%>
            <%--            </tr>--%>
            </tbody>
        </table>
    </form>
</div>
</body>
</html>
<script src="../js/webOffice/fileShow.js?20190402.1" type="text/javascript" charset="utf-8"></script>
<script src="../js/attachment/attachView.js?20190901.1" type="text/javascript" charset="utf-8"></script>
<script>
    var activistId;
    function getQueryString(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r!=null)return  unescape(r[2]); return null;
    }
    var userId = getQueryString('userId');
    layui.use(['upload','form','table','laydate'], function() {
        var upload = layui.upload
            , form = layui.form
            , table = layui.table
            , laydate = layui.laydate;

        $.ajax({
            url:'/partyMember/partyInfo',
            dataType:'json',
            type:'post',
            data:{
                userId:userId
            },
            success:function(res) {
                var data = res.object;
                var sex = "";
                if (data.sex == 0) {
                    sex = '男';
                } else {
                    sex = '女';
                }
                //console.log(activistId);
                //remindUrl='" + encodeURI(data.obj[i].remindUrl) + "'
                var time =""
                if(data.activistsTime!=undefined&&data.activistsTime!=""){
                    time =layui.util.toDateString( data.activistsTime , 'yyyy-MM-dd')
                }
                var d = data.developPhase;
                if(d=="2" && (data.nodeStatus=="0"||data.nodeStatus=="1")){
                    d="7";
                }
                if(d=="3"&& (data.nodeStatus=="0"||data.nodeStatus=="1")){
                    d = "2";
                }
                //console.log(activistId);
                form.val('example', {
                    "username": data.userName
                    , "development": d //发展阶段
                    , "sex": sex
                    , "nativity": data.birthday
                    ,"minority":data.familyName
                    , "functionar": data.postName
                    , "unit": data.deptName //单位（部门）
                    , "pertain": data.parentPedtName //所属党支部
                    , "sureTime": time
                    ,"recommendPerson":data.recommendPerson//入党介绍人
                    ,"developContacts":data.developContacts//培养联系人
                    ,"applyTime":data.applyTime
                    ,"developTime":data.developTime
                    ,"receiveTime":data.receiveTime
                    ,"stateTime":data.stateTime

                });
                /**
                 * 一共四个阶段：
                 *      一阶段：申请入党 2个附件
                 *      二阶段：积极分子 13个附件
                 *      三阶段 确定发展对象 11个附件
                 *      四阶段 预备党员未接受状态 13个附件
                 *      五阶段 预备党员接收状态 16个附件
                 */

                    //一阶段
                var strApplyId = data.attachmentIdApply;
                //var applyId = strApplyId.split(",");
                var strApply = data.attachmentNameApply;
                //var applyStr = strApply.split(",");
                if(strApplyId !=undefined &&strApplyId != "") {
                    var fileEle = renderingFile(strApplyId, strApply)
                    for (var i = 0; i < $('.apply').length; i++) {
                        $(".apply").eq(i).html(fileEle[i]);
                    }
                }


                //二阶段
                var strIdOne = data.attachmentIdPositive;
                //var activistId = strIdOne.split(",");
                var strOne = data.attachmentNamePositive;
                if(strIdOne !=undefined &&strIdOne != "") {
                    fileEle = renderingFile(strIdOne, strOne)
                    for (var i = 0; i < $('.positive').length; i++) {
                        $(".positive").eq(i).html(fileEle[i]);
                    }
                }


                //三阶段
                var strDevelopId = data.attachmentIdDevelop;
                //var developId = strDevelopId.split(",");
                var strDevelop = data.attachmentNameDevelop;
                if(strDevelopId !=undefined && strDevelopId != ""){
                fileEle = renderingFile(strDevelopId,strDevelop)
                for(var i = 0; i<$('.develop').length; i++){
                    $(".develop").eq(i).html(fileEle[i]);
                }
                }


                //四阶段
                var strPreId = data.attachmentIdReceive;
                //var preMemberId = strPreId.split(",");
                var strPreMember = data.attachmentNameReceive;
                if(strPreId !=undefined && strPreId != "") {
                    fileEle = renderingFile(strPreId, strPreMember)
                    for (var i = 0; i < $('.receive').length; i++) {
                        $(".receive").eq(i).html(fileEle[i]);
                    }
                }
                //五阶段
                var strPrepare = data.attachmentIdPrepare;
                //var preMemberId = strPreId.split(",");
                var strPrepareName = data.attachmentNamePrepare;
                if(strPrepare !=undefined && strPrepare != "") {
                    fileEle = renderingFile(strPrepare, strPrepareName)
                    for (var i = 0; i < $('.praepare').length; i++) {
                        $(".praepare").eq(i).html(fileEle[i]);
                    }
                }

                var id1 = data.attachmentIdReport;
                var name1 = data.attachmentNameReport;
                var time1 = data.reportTime;
                var id2 = data.attachmentIdDevelopsReport;
                var name2 = data.attachmentNameDevelopsReport;
                var time2 = data.developsReportTime;
                var id3 = data.attachmentIdThoughtReport;
                var name3 = data.attachmentNameThoughtReport;
                var time3 = data.thoughtReportTime;
                if(id1 != undefined && id1 != ""){
                    if(id1.substring(id1.length-1,id1.length)==","){
                        id1 = id1.substring(0,id1.length-1);
                    }
                    id1 = id1.split(",");
                    name1 = name1.split(",")
                    time1 = time1.split(",")
                    var str = "";
                    for(var i = 0 ; i < id1.length ; i++){
                        num = i;
                        var na = name1[i].substring(0,name1[i].length-1);
                        var id = id1[i].substring(0,id1[i].length-1);
                        var ti = time1[i];
                        var aid = "\'"+urlTOattid(id1[i].substring(0,id1[i].length-1))+"\'";
                        if(i==0){
                            str =  ' <tr class="fromTrme">\n' +
                                '<td class="fromTdme1">入党积极分子思想汇报进度</td>'+
                                '                <td class="fromTdme2"  colspan="3">\n' +
                                '                    <span class="mindReport">'+ na +'</span><span class="mindTime">'+ ti +'</span>\n' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="dj($(this))" style="cursor:pointer;" attrurl="'+ id +'">查看</button>\n' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="downFile('+aid+')" style="cursor:pointer; margin-left: 10px;" >下载</button>\n' +
                                '                </td>\n' +
                                '            </tr>'
                        }else{
                            str += ' <tr class="fromTrme">\n' +
                                '<td style="display: none"></td>'+
                                '                <td class="fromTdme2"  colspan="3">\n' +
                                '                    <span class="mindReport">'+ na +'</span><span class="mindTime">'+ ti +'</span>' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="dj($(this))" style="cursor:pointer;" attrurl="'+ id +'">查看</button>\n' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="downFile('+aid+')" style="cursor:pointer; margin-left: 10px;" >下载</button>\n' +
                                '                </td>\n' +
                                '            </tr>'
                        }
                    }
                    $("#tr1").after(str)
                    $(".fromTdme1").attr("rowspan",id1.length);
                }
                if(id2 != undefined&&id2 != ""){
                    if(id2.substring(id2.length-1,id2.length)==","){
                        id2 = id2.substring(0,id2.length-1);
                    }
                    id2 = id2.split(",");
                    name2 = name2.split(",")
                    time2 = time2.split(",")
                    var str="";
                    for(var i = 0 ; i < id2.length ; i++){
                        num = i;
                        var na = name2[i].substring(0,name2[i].length-1);
                        var id = id2[i].substring(0,id2[i].length-1);
                        var ti = time2[i];
                        var aid = "\'"+urlTOattid(id2[i].substring(0,id2[i].length-1))+"\'";
                        if(i==0){
                            str =  ' <tr class="fromTrme3">\n' +
                                '<td class="fromTdme22">发展对象考察培养进度</td>'+
                                '                <td class="fromTdme2"  colspan="3">\n' +
                                '                    <span class="mindReport">'+ na +'</span><span class="mindTime">'+ ti +'</span>' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="dj($(this))" style="cursor:pointer;" attrurl="'+ id +'">查看</button>\n' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="downFile('+aid+')" style="cursor:pointer; margin-left: 10px;" >下载</button>\n' +
                                '                </td>\n' +
                                '            </tr>'
                        }else{
                            str += ' <tr class="fromTrme3">\n' +
                                '<td style="display: none"></td>'+
                                '                <td class="fromTdme2"  colspan="3">\n' +
                                '                    <span class="mindReport">'+ na +'</span><span class="mindTime">'+ ti +'</span>' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="dj($(this))" style="cursor:pointer;" attrurl="'+ id +'">查看</button>\n' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="downFile('+aid+')" style="cursor:pointer; margin-left: 10px;" >下载</button>\n' +
                                '                </td>\n' +
                                '            </tr>'
                        }
                    }
                    $("#tr2").after(str)
                    $(".fromTdme22").attr("rowspan",id2.length);
                }
                if(id3 != undefined&&id3 != ""){
                    if(id3.substring(id3.length-1,id3.length)==","){
                        id3 = id3.substring(0,id3.length-1);
                    }
                    id3 = id3.split(",");
                    name3 = name3.split(",")
                    time3 = time3.split(",")
                    var str="";
                    for(var i = 0 ; i < id3.length ; i++){
                        num = i;
                        var na = name3[i].substring(0,name3[i].length-1);
                        var id = id3[i].substring(0,id3[i].length-1);
                        var ti = time3[i];
                        var aid = "\'"+urlTOattid(id3[i].substring(0,id3[i].length-1))+"\'";
                        if(i==0){
                            str =  ' <tr class="fromTrme3">\n' +
                                '<td class="fromTdme3">预备党员考察培养进度</td>'+
                                '                <td class="fromTdme2"  colspan="3">' +
                                '                    <span class="mindReport">'+ na +'</span><span class="mindTime">'+ ti +'</span>' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="dj($(this))" style="cursor:pointer;" attrurl="'+ id +'">查看</button>\n' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="downFile('+aid+')" style="cursor:pointer; margin-left: 10px;" >下载</button>\n' +
                                '                </td>\n' +
                                '            </tr>'
                        }else{
                            str += ' <tr class="fromTrme3">\n' +
                                '<td style="display: none"></td>'+
                                '                <td class="fromTdme2"  colspan="3">\n' +
                                '                    <span class="mindReport">'+ na +'</span><span class="mindTime">'+ ti +'</span>' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="dj($(this))" style="cursor:pointer;" attrurl="'+ id +'">查看</button>\n' +
                                '                    <button type="button" style="margin-top: -32px" class="layui-btn" onclick="downFile('+aid+')" style="cursor:pointer; margin-left: 10px;" >下载</button>\n' +
                                '                </td>\n' +
                                '            </tr>'
                        }
                    }
                    $("#tr3").after(str)
                    $(".fromTdme3").attr("rowspan",id3.length);
                }
            }
        })
        //入党介绍人
        $("#updat1").click(function(){
            $.ajax({
                type: 'post',
                url: '/partyMember/selectDCandRP',
                dataType: 'json',
                data:{
                    type:"RP",
                    userId:userId
                },
                success: function (res) {
                    if(res.flag == true){
                        $.popWindow('/workflow/work/workform?opflag=1&flowId='+res.object.flowId+'&type=new&flowStep=1&prcsId=1&runId='+res.object.runId);
                        // window.location.herf = 'workflow/work/workform?opflag=1&flowId="'+170+'"&type=new&flowStep=1&prcsId=1&runId="'+106+')'
                    }else{
                        layui.layer.msg(res.msg);
                    }
                }
            })
        })
        //培养联系人
        $("#updat2").click(function(){
            $.ajax({
                type: 'post',
                url: '/partyMember/selectDCandRP',
                dataType: 'json',
                data:{
                    type:"DC",
                    userId:userId
                },
                success: function (res) {
                    if(res.flag == true){
                        $.popWindow('/workflow/work/workform?opflag=1&flowId='+res.object.flowId+'&type=new&flowStep=1&prcsId=1&runId='+res.object.runId);
                        // window.location.herf = 'workflow/work/workform?opflag=1&flowId="'+170+'"&type=new&flowStep=1&prcsId=1&runId="'+106+')'
                    }else{
                        layui.layer.msg(res.msg);
                    }
                }
            })
        })
    })
    //返回
    $('.return').click(function(){
        history.back(-1);
    })

    // function lookFile(repalogId){ //查看附件
    //     //console.log(repalogId)
    //     if (repalogId == undefined || repalogId == "") {
    //         layer.msg("文件已被损坏，无法查看");
    //     } else {
    //         selectFile(repalogId,'workflow');
    //     }
    // }
    function urlTOattid(url){
        var atts = url.split("&");
        var aid = "";
        var ym = "";
        var attid = "";
        for(var i = 0; i<atts.length;i++){
            if(atts[i].indexOf("AID=") > -1){
                aid=atts[i].split("=")[1]
            }else if(atts[i].indexOf("YM=")> -1){
                ym=atts[i].split("=")[1]
            }else if(atts[i].indexOf("ATTACHMENT_ID=")> -1){
                attid=atts[i].split("=")[1]
            }
        }
        return aid+"@"+ym+"_"+attid;
    }
    function downFile(repalogId){//下载附件
        if (repalogId == undefined || repalogId == "") {
            layer.msg("文件已被损坏，无法下载");
        } else {
            window.location.href = "/equipment/limsDownload?model=equipment&attachId=" +repalogId
        }
    }

    /**
     * 一共五个阶段 即本页面调用本方法五次
     * @param attachmentId
     * @param attachmentName
     */
    function renderingFile(attachmentId,attachmentName){
        var result = [];//定义返回值，数组类型
        if(attachmentId== undefined || attachmentId == ""){
            return ;
        }
        //判断最后一个是否是,是,截掉，split方法最后一个是,会多截一个空数组
        if(attachmentId.substring(attachmentId.length-1,attachmentId.length)==","){
            attachmentId = attachmentId.substring(0,attachmentId.length-1);
        }
        if(attachmentName.substring(attachmentName.length-1,attachmentName.length)==","){
            attachmentName = attachmentName.substring(0,attachmentName.length-1);
        }
        var attachIdArr = attachmentId.split(",");//截取字符串成数组，数组长度为第几阶段对于的附件数量
        var attachNameArr = attachmentName.split(","); //截取字符串成数组，数组长度为第几阶段对于的附件数量
        for(var i=0;i<attachIdArr.length;i++){
            //因为两个数组长度一定相同所有循环一个也可以取出另一个
            var attaIdStr = attachIdArr[i];
            if(attaIdStr.substring(attaIdStr.length-1,attaIdStr.length)=="*"){
                attaIdStr = attaIdStr.substring(0,attaIdStr.length-1);
            }
            var attaIdStrArr = attaIdStr.split("*");
            var attaNameStr = attachNameArr[i];
            if(attaNameStr.substring(attaNameStr.length-1,attaNameStr.length)=="*"){
                attaNameStr = attaNameStr.substring(0,attaNameStr.length-1);
            }
            var attaNameStrArr = attaNameStr.split("*");
            var eleStr = "";
            for(var j=0;j<attaIdStrArr.length;j++){
                var aid = "\""+urlTOattid(attaIdStrArr[j])+"\"";
                var attachmentIdApply = attaIdStrArr[j]+'&FILESIZE='
                var aname = "\""+attaNameStrArr[j]+"\"";
                eleStr+="<div style='height: 30px;padding :6px;'>" +
                    "附件：<input class='inpSty' readonly value="+aname+">" +
                    "<span class='operations'>" +
                    "<a class='layui-btn' onclick='dj($(this))'  attrurl = "+attachmentIdApply+"  style='cursor:pointer;'>查阅</a>" +
                    "<a class='layui-btn' onclick='downFile(" + aid + ")' style='cursor:pointer; margin-left: 10px;'>下载</a>" +
                    "</span>" +
                    "</div>"
            }


            result.push(eleStr);
        }
        return result;
    }

    function UrlGetRequest(name) {//截取文件后缀
        var attach=name
        return attach.substring(attach.lastIndexOf(".")+1,attach.length);
    }
    function dj(e){
        var atturl = e.attr('attrurl');
        pdurl(UrlGetRequest('?'+atturl),atturl);
    }
    function pdurl(gs,atturl){ //根据后缀判断选择调取那种打开方式
        if(atturl != undefined&&atturl.indexOf('&ATTACHMENT_NAME=') > -1&&atturl.indexOf('isOld=1') == -1){
            var atturl1 = atturl.split('&ATTACHMENT_NAME=')[0] + '&ATTACHMENT_NAME=';
            var atturl2 = '';
            if(atturl.split('&ATTACHMENT_NAME=')[1] != undefined&&atturl.split('&ATTACHMENT_NAME=')[1].indexOf('&') > -1){
                for(var i=1;i<atturl.split('&ATTACHMENT_NAME=')[1].split('&').length;i++){
                    atturl2 += '&' + atturl.split('&ATTACHMENT_NAME=')[1].split('&')[i];
                }
                atturl = atturl1 + atturl2;
            }else{
                atturl = atturl1;
            }
        }
        if(gs == 'png'||gs == 'jpg'||gs == 'bmp' || gs == 'emf' || gs == 'gif'|| gs == 'pcx'|| gs == 'pcd'|| gs == 'ai'|| gs == 'webp'|| gs == 'WMF'|| gs == 'dxf' ||gs == 'PNG'||gs == 'JPG'||gs == 'BMP' || gs == 'EMF' || gs == 'GIF'|| gs == 'PCX'|| gs == 'PCD'|| gs == 'AI'|| gs == 'WEBP'|| gs == 'wmf'|| gs == 'DXF'|| gs == 'txt'|| gs == 'TXT'){
            $.popWindow("/xs?"+atturl,PreviewPage,'0','0','1200px','600px');
        }else if(gs == 'mp4'||gs == 'rmvb'||gs == 'avi'||gs == 'ifo'||gs == 'wmv'||gs == 'MP4'||gs == 'RMVB'||gs == 'AVI'||gs == 'IFO'||gs == 'WMV'){
            layer.open({type: 2, title: false, area: ['630px', '360px'], shade: 0.8, closeBtn: 0, shadeClose: true, content: "/common/video?videoatturlsplit="+atturl});
            layer.msg('点击任意处关闭');
        }else if(gs == 'pdf'||gs == 'PDF'){
            $.popWindow("/pdfPreview?"+atturl,PreviewPage,'0','0','1200px','600px');
        }else{
            var url = "/common/webOfficeView?documentEditPriv=0&fomat="+gs+"&"+atturl;
            $.ajax({
                url:'/syspara/selectTheSysPara?paraName=OFFICE_EDIT',
                type:'post',
                datatype:'json',
                async:false,
                success: function (res) {
                    if(res.flag){
                        if(res.object[0].paraValue == 0){
                            //默认加载NTKO插件 进行跳转
                            url = "/common/ntkoview?documentEditPriv=0&fomat="+gs+"&"+atturl;
                        }
                    }

                }
            })
            $.popWindow(url,PreviewPage,'0','0','1200px','600px');
        }
    }
    //onclick='lookFile(" + aid + ")'
</script>


